<?php

namespace app\api\controller;

use app\common\controller\Api;

class Config extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    public function getConfig()
    {
        //得到能运行的最基础的配置, 目前只有school和默认school

        $store = \app\common\model\Store::order('id', 'asc')->find();
        if (is_null($store)) {
            $this->error('没有门店数据');
        }

        $returnArr['default_store_id'] = $store->id;

        $this->success('返回成功', $returnArr);
    }
}
